package com.lanou.entity;

import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * @author 姚云鹏
 * Create at: 2018/6/8 14:54
 */
public class Phone {
    @NotBlank(message = "品牌不能为空")
    private String brand;
    @Pattern(regexp = "[A-Z]([A-Za-z0-9]{3}-){1,3}[0-9]{3,4}[A-Z]?")
    private String model;
    @Min(value = 0)
    private Double price;
    private Date launchDate;

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Date getLaunchDate() {
        return launchDate;
    }

    public void setLaunchDate(Date launchDate) {
        this.launchDate = launchDate;
    }
}
